/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.util.Date;

/**
 * <p>Project: jse2303 - Switch1
 * <p>Powered by webrx On 2023-07-11 14:04:31
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Switch1 {
    public static void main(String[] args) {
        //switch 支持哪些类型？ byte Byte short Short int Integer char Character String enum(枚举)
        var d = new Date();
        var k = d.getDay();
        //if(){}else if(){}else if(){}else{}
        switch (k) {
            case 0:
                System.out.println("星期日");
                break;
            case 1:
                System.out.println("星期一");
                break;
            case 2:
                System.out.println("星期二");
                break;
            case 3:
                System.out.println("星期三");
                break;
            case 4:
                System.out.println("星期四");
                break;
            case 5:
                System.out.println("星期五");
                break;
            default:
                System.out.println("星期六");
                break;
        }
    }
}
